home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
10,000 Great Games
/
10,000 Great Games.iso
/
Product
/
66
/
data1.cab
/
Source_Files
/
Src
/
Inflame.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2000-01-16
|
750b
|
44 lines
#include "stdafx.h"
cInflamable::cInflamable(int _x, int _y, cProperties *_orig)
: cWeapon(_x, _y, _orig, "MOVING")
{
orig->get_sequence("ON FIRE", on_fire_seq);
move_object_after_hit = FALSE;
ASSERT(!inflamable_contents_list.is_empty());
}
cInflamable::~cInflamable()
{
}
int cInflamable::control()
{
cWeapon::control();
bounce_on_boundaries();
// Check if we fell onto something
if (resting && explode)
{
cHurting *h = new cHurting(x, y, inflamable_contents_list.get_random());
h->set_position(x, y);
h->make_dirty();
return FALSE;
}
return !in_water();
}
void cInflamable::hit(fix, cWeapon *)
{
explode = TRUE;
set_sequence(on_fire_seq, TRUE);
}